# import tushare as ts
# ts.set_token('ea368b096e82255de7b26daf8a0c82575187ce88d8773a30c26449a6')
# pro = ts.pro_api()
# # 获取所有A股票代码
# stocks = ts.get_stock_basics()
#
# # # 获取所有股票实时信息
# # realtime_quotes = ts.get_realtime_quotes(stocks.index.tolist())
# #
# # # 打印实时信息
# # print(realtime_quotes)
import tushare as ts
ts.set_token('ea368b096e82255de7b26daf8a0c82575187ce88d8773a30c26449a6')
pro = ts.pro_api()
df = pro.index_daily(ts_code='000001.SH',start_date="20190101")
df = df.sort_values(by='trade_date',ascending=True)
df = df.reset_index(drop=True)
df.rename(columns={'vol':'volume'}, inplace = True)
